package com.example.guide.properties;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Component
@PropertySource("classpath:config/user.properties")
@ConfigurationProperties(prefix = "user")
@Data
public class User {
    private int id;
    private String name;
    private String sex;
    private Integer age;
    private Double salary;
    private String address;

  //  private LocalDateTime hibernate;

    private Book[] books;
    private List<String> names;
    private Map<String,Integer> students;

}

@Data
class Book{
    private String name;
    private Double price;
}

